﻿using Flame.Dlr;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Flame.Controls
{
    /* public class GuiHelper
     {
         static void exec(IExecutable e, string path)
         {
             dynamic d = e.Execute(File.ReadAllText(path));
             if (d.Data is Exception)
                 MessageBox.Show(((Exception)d.Data).Message);
         }


         public static void LoadMenu(ScripterControlFormVariable scripterControlFormVariable)
         {
             var pc = new IronPythonExec();
             AssemblyHelper.Apply(AssemblyHelper.CurrentAppDomainAssemblies, pc);
             pc.AddVariable(new Variable() { Name = "flame", Data = scripterControlFormVariable });

             foreach (var py in Directory.EnumerateFiles(PathsHelper.GetMainPath("GUI"), "*.py"))
             {
                 exec(pc, py);
             }
         }
     }*/
}
